﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using HexChessBoard;

namespace HexChessBoard.PlayerComponents
{
    /// <summary>
    /// Implementation for all players, regardless of type.
    /// </summary>
    public abstract class Player
    {
        // this should really be in playerlocal, moved here for board.cs hack
        public PlayerIndex playerIndex; // the controller index of the player

        private PieceColor side;
        public PieceColor Side
        {
            get { return side; }
        }
        public SimpleCamera PlayerCamera;
        public bool UpgradingPieces = false;

        public Board PlayerBoard;
        public Tile SelectedTile;       // the tile the player is currently selected.
        public Tile SourceTile;         // the tile/piece the player actively selected and will be moving
        public Tile DestinationTile;    // the tile the player would like to move the SourceTile piece to.

        public short displayAvailable = 0;// Display modes for tile suggestions: 0 - all (available + threatened), 1 - available, 2 - none
        public short displayMode = 0;    // Display modes for text: 0 - all, 1 - some, 2 - none
        
        // Input state
        //public InputState InputState;

        public Player(Board board, PieceColor pieceColor)
        {
            PlayerBoard = board;
            side = pieceColor;
        }

        public abstract void Draw(GameTime gameTime);

        public abstract void Update(Board board, GameTime gameTime);

        //public abstract void HandleInput(InputState inputState);

        public abstract void HandleInput(InputState inputState, GameTime gameTime);
    }
}
